﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns:vs="http://schemas.microsoft.com/Visual-Studio-Intellisense"
           elementFormDefault="qualified"
           attributeFormDefault="unqualified"
           vs:helpNamespace="http://schemas.microsoft.com/RazorCustomSection">
  <xs:element name="httpAuth">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="1">
        <xs:element name="credentials">
          <xs:complexType>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
              <xs:element name="user">
                <xs:complexType>
                  <xs:attribute name="name" use="required">
                  </xs:attribute>
                  <xs:attribute name="password" type="xs:string" use="required">
                  </xs:attribute>
                </xs:complexType>
              </xs:element>
            </xs:choice>
            <xs:attribute name="source">
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:enumeration value="Inline"/>
                  <xs:enumeration value="FormsAuthentication"/>
                  <xs:enumeration value="MembershipProvider"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:attribute>

            <xs:attribute name="passwordFormat">
              <xs:simpleType>
                <xs:union>
                  <xs:simpleType>
                    <xs:restriction base="xs:string">
                      <xs:enumeration value="Clear"/>
                      <xs:enumeration value="MD5"/>
                      <xs:enumeration value="SHA1"/>
                      <xs:enumeration value="MD5Digest"/>
                    </xs:restriction>
                  </xs:simpleType>
                  <xs:simpleType>
                    <xs:restriction base="xs:string">
                    </xs:restriction>
                  </xs:simpleType>
                </xs:union>
              </xs:simpleType>
            </xs:attribute>
          </xs:complexType>

        </xs:element>
      </xs:choice>
      <xs:attribute name="mode">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="None"/>
            <xs:enumeration value="Basic"/>
            <xs:enumeration value="Digest"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="realm" type="xs:string">
      </xs:attribute>
    </xs:complexType>
  </xs:element>
</xs:schema>
